#[derive(Deserialize)]
pub struct Options {
flag_index: Option<String>,
- flag_host: Option<String>,
+ flag_host: Option<String>, // TODO: Deprecated, remove
flag_token: Option<String>,
flag_manifest_path: Option<String>,
flag_verbose: u32,
Options:
-h, --help Print this message
- --index INDEX Host to upload the package to
- --host HOST DEPRECATED
+ --index INDEX Registry index to upload the package to
+ --host HOST DEPRECATED, renamed to '--index'
--token TOKEN Token to use when uploading
--no-verify Don't verify package tarball before publish
--allow-dirty Allow publishing with a dirty source directory
let Options {
flag_token: token,
flag_index: index,
- flag_host: host,
+ flag_host: host, // TODO: Deprecated, remove
flag_manifest_path,
flag_no_verify: no_verify,
flag_allow_dirty: allow_dirty,
} = options;
+ // TODO: Deprecated
+ // remove once it has been decided --host can be removed
+ // We may instead want to repurpose the host flag, as
+ // mentioned in this issue
+ // https://github.com/rust-lang/cargo/issues/4208
let msg = "The flag '--host' is no longer valid.
Previous versions of Cargo accepted this flag, but it is being
token: token,
index:
if host.clone().is_none() || host.clone().unwrap().is_empty() { index }
- else { config.shell().warn(&msg)?; host },
+ else { config.shell().warn(&msg)?; host }, // TODO: Deprecated, remove
verify: !no_verify,
allow_dirty: allow_dirty,
jobs: jobs,